package cn.itcast.web.controller;

import cn.itcast.dataobject.Account;
import cn.itcast.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wangxg
 */
@RestController
@RequestMapping("/account")
public class HelloController {

    @Autowired
    private AccountService accountService;

    @RequestMapping("/list")
    public List<Account> sayHello() {
        return accountService.findAll();
    }
}
